import MdPriview from "@/components/md-priview"
import { useEffect, useState } from "react"

const Article = () => {
  const [content, setContent] = useState('')
  useEffect(() => {
    // 从外部文件加载 Markdown 内容
    fetch('/src/components/md-priview/test.md')
      .then(response => response.text())
      .then(data => {
        setContent(data);
      })
      .catch(error => {
        console.error('Failed to load Markdown file:', error);
      });
  }, []);
  return (
    <div style={{ paddingTop: '100px' }}>
      <MdPriview content={content} />
    </div>
  )
}

export default Article
